package com.tree.shiro.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName com.tree.shiro
 * Description: <类功能描述>. <br>
 * <p>
 * <使用说明>
 * </p>
 * @Author tree
 * @Date 2019-06-26 00:15
 * @Version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {
    /**
     *
     * @return
     */
    @RequestMapping("/userList")
//    @RequiresRoles("gu")
//    @RequiresPermissions("user:view")//权限管理;
    public String userInfo(){
        return "userList";
    }

    /**
     *
     * @return
     */
    @RequestMapping("/userAdd")
//    @RequiresPermissions("user:add")//权限管理;
//    @RequiresRoles("admin")
    public String userInfoAdd(){
        return "userAdd";
    }

    /**
     * 用户删除;
     * @return
     */
    @RequestMapping("/userDel")
//    @RequiresPermissions("user:del")//权限管理;
    public String userDel(){
        return "userDel";
    }
}
